package br.com.br1.fv.model;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

public class ValueObject {

	Map<String, Object> properties;
	
	public ValueObject(){
		properties = new HashMap<String, Object>();
	}
	
	public void setProperty(String name, Object value){
		properties.put(name, value);
	}
	
	public Map<String, Object> getProperties() {
		return properties;
	}

	public String asString(String property){
		return (String) properties.get(property);
	}

	public BigDecimal asBigDecimal(String property){
		return (BigDecimal) properties.get(property);
	}

	public Timestamp asTimeStamp(String property){
		return (Timestamp) properties.get(property);
	}
}
